-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Skip db tests unless explicitly specified in -m pattern #24492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24492 +/- ##
===========================================
- Coverage 92.31% 31.92% -60.39%
===========================================
Files 166 166
Lines 52412 52412
===========================================
- Hits 48382 16731 -31651
- Misses 4030 35681 +31651
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24492 +/- ##
===========================================
- Coverage 92.31% 31.91% -60.41%
===========================================
Files 166 166
Lines 52387 52387
===========================================
- Hits 48359 16717 -31642
- Misses 4028 35670 +31642
Continue to review full report at Codecov.
|
@datapythonista : I'm confused by the motivation for your changes here... Where have we defined a flag for |
good point @gfyoung, I added much more context and references to the previous issues to the description. I think it should be clear now, let me know if it's not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comment, otherwise lgtm.
lgtm. merge on green. |
thanks! |
…strings * upstream/master: TST: Skip db tests unless explicitly specified in -m pattern (pandas-dev#24492) Mix EA into DTA/TDA; part of 24024 (pandas-dev#24502) DOC: Fix building of a single API document (pandas-dev#24506) DOC: Fixing broken references in the docs (pandas-dev#24497) DOC: Splitting api.rst in several files (pandas-dev#24462) Fix misdescription in escapechar (pandas-dev#24490) Floor and ceil methods during pandas.eval which are provided by numexpr (pandas-dev#24355) BUG: Pandas any() returning false with true values present (GH pandas-dev#23070) (pandas-dev#24434) Misc separable pieces of pandas-dev#24024 (pandas-dev#24488) use capsys.readouterr() as named tuple (pandas-dev#24489) REF/TST: replace capture_stderr with pytest capsys fixture (pandas-dev#24496) TST- Fixing issue with test_parquet test unexpectedly passing (pandas-dev#24480) DOC: Doc build for a single doc made much faster, and clean up (pandas-dev#24428) BUG: Fix+test timezone-preservation in DTA.repeat (pandas-dev#24483) Implement reductions from pandas-dev#24024 (pandas-dev#24484)
* upstream/master: REF/TST: replace capture_stdout with pytest capsys fixture (pandas-dev#24501) BUG: fix .iat assignment creates a new column (pandas-dev#24495) DOC: add checks on the returns section in the docstrings (pandas-dev#23138) (pandas-dev#23432) ENH: Add strings_as_fixed_length parameter for df.to_records() (pandas-dev#18146) (pandas-dev#22229) TST: Skip db tests unless explicitly specified in -m pattern (pandas-dev#24492) Mix EA into DTA/TDA; part of 24024 (pandas-dev#24502) DOC: Fix building of a single API document (pandas-dev#24506)
Since #24450 we don't skip the db tests if the connection fails. That's useful, because the CI won't fail silently if there is any problem with the databases. But as reported in #24485, it's common to have
pymysql
orpsycopg2
installed locally, but no database connection. This is making the tests fail locally, and the agreed solution is to skip the db tests unless they are explicitly requested.But pytest doesn't make it easy to skip tests by default when using
-m
, but this solution should work. Another option would be an--include-db
option, but I think it makes reading the expressions in the build very difficult (like, what--only-slow --include-db
runs?). With-m
the expressions are much clearer (e.g.slow and db
), so I think this option is better.The
eval
is howpytest
itself evaluates the value of the-m
parameter.